package org.ws.edu;

import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;

import org.apache.log4j.Logger;
import org.ws.edu.ui.ConsoleHandlerUI;
import org.ws.edu.ui.MenuDispatcher;

public class StartClient {
    private static Logger logger = Logger.getLogger(StartClient.class);

    public static void main(String[] args) {
        try {
            Socket socket = new Socket("localhost", 4444);
            new MenuDispatcher(new ConsoleHandlerUI(socket)).run();
        } catch (UnknownHostException e) {
            logger.warn("Unknown Host", e);
        } catch (IOException e) {
            logger.warn("Could not create socket", e);
        }
    }
}